package com.hlhj.funlike_business.presenter;

import android.content.Context;

import com.example.mymvp.mvp.BasePresenter;
import com.hlhj.funlike_business.bean.OrderListBean;
import com.hlhj.funlike_business.moudle.AllOrderFragmentMoudle;
import com.hlhj.funlike_business.views.AllOrderFragmentView;

import java.util.List;

public class AllOrderFragmentPresenter extends BasePresenter<AllOrderFragmentMoudle,AllOrderFragmentView> implements AllOrderFragmentMoudle.getOrderList {
    @Override
    public void createModule() {
        module = new AllOrderFragmentMoudle();
        module.setListener(this);
    }

    public void LoadOrderList(Context context,int status,int p,int num){
        module.LoadOrderList(context,status,p,num);
    }

    public void LoadResult(Context context,int order_id,int status){
        module.LoadResult(context,order_id,status);
    }

    public void LoadChargeBack(Context context,int order_id){
        module.LoadChargeBack(context,order_id);
    }

    @Override
    public void loadOrderList(List<OrderListBean.DataBeanX.DataBean> dataBeans) {
        getView().showOrderList(dataBeans);
    }

    @Override
    public void loadResult(String msg) {
        getView().showResult(msg);
    }
}
